import java.util.Scanner;

public class homework13 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个整数：");
        int n = scanner.nextInt();
        int sum = 0;
        int num = 0;
        for(int i =1 ; i< n ; i++ ){
            if(i%7==0) {
                sum += i;
                num++;

            }

        }System.out.println("被7整除的有：" + num+"个");
        System.out.println("被7整除的和为："+sum);
    }

}
 
